package com.driver.fordriver.handler;

import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Message;

import com.driver.fordriver.MainActivity;
import com.driver.fordriver.activity.LoginActivity;
import com.driver.fordriver.util.Commands;

/**
 * Created by XuYeWen on 2017/4/26.
 */

public class MyHandler extends Handler {
    private static Context mContext;
    private volatile static MyHandler uniqueInstance;

    private MyHandler(Context context) {
        mContext=context;
    }

    public static MyHandler getInstance(Context context) {
        if(uniqueInstance == null) {
            synchronized (MyHandler.class) {
                if(uniqueInstance == null) {
                    uniqueInstance = new MyHandler(context);
                }
            }
        }
        return uniqueInstance;
    }

    @Override
    public void handleMessage(Message msg) {
        super.handleMessage(msg);
    }
}
